using System;
using System.Collections.Generic;
using System.Text;
using ServerPattern;
using System.IO;
using System.Net.Sockets;
using SyncedFileAccess;

namespace HttpServer
{
	public class HttpServer : AbstractServer
	{
        private SyncedFile outputfile;

        public HttpServer(SyncedFile outputFile)
        {
            this.outputfile = outputFile;
        }

		override protected AbstractHandler CreateHandler(Socket client)
		{
			return new HttpHandler(client,outputfile);
		}

        override public void Stop()
        {
            base.Stop();
            StreamWriter swEnd = new StreamWriter(ender.GetStream());
            swEnd.WriteLine("End waiting Request in Handler Threads Method which is waiting on Readline()");
            swEnd.Flush();
        }

	}
}
